import net.optix.ip.model.ModelLocator;
import net.optix.ip.vo.InventionVO;
import views.ViewInstance;
[Bindable]
private var model:ModelLocator	=	ModelLocator.getInstance();

public var _invention:InventionVO;

public function set invention(value:InventionVO):void
{
	_invention	=	value;
	var isVisible:Boolean	=	false;
	
	if(value.clientID == model.client.clientID)
	{
		if(value.status < 3)
		{
			isVisible	=	true;
		}
	}
	if(value.inventorID == model.inventor.inventorID)
	{
		if(value.status == 1)
		{
			isVisible	=	true;
		}
	}
	this.enabled	=	isVisible;
}
public function get invention():InventionVO
{
	return _invention;
}

private function showUpdateInvention():void
{
	model.actionView	=	0;
	model.actionView	=	ViewInstance.UpdateBasicInformation;
}